{% extends "base.html" %}
{% block title %}WebSth - 分享，聚合 - 消息列表{% endblock %}

{% block content %}
    {% if messages_list %}
        {% for thread in messages_list %}
        <table class="listTable"> 
			<thead> 
				<tr> 
					<th width="90">作者</th> 
					<td width="600">标题</td> 
					<th width="60">时间</th> 
					<th width="40">动作</th> 
				</tr> 
			</thead> 
			<tbody> 
                    {% for m in thread %}
                    <tr> 
                        <td><a href="/u/{{m.fromUser.username}}/">{{m.fromUser.get_profile.nickname}}</a></th> 
                        <td><a href="/m/{{m.id}}/">{{m.title}}</a></td> 
                        <td>{{m.createDate}}</th> 
                        <td><a href="/m/new/?next={{request.path}}">新消息</a> | <a href="/m/reply/{{m.id}}/">回复</a> | <a href="/m/delete/{{m.id}}/">删除</a></th> 
                    </tr>
                    {% endfor %}
            </tbody> 
		</table> 
        {% endfor %}
    {% else %}
    <p>没有任何消息</p>
    <p><a href="/m/new/?next={{request.path}}">创建一个？</a></p>
    
    {% endif %}
{% endblock %}